The present invention relates to an image binary coding method that is employed in printers, scanners, copying machines, facsimile machines and the like, and the method can reproduce a multi-gradation-image into a binary gradation image.
The error-diffusion method is known as one of the methods converting a multi-gradation image into a binary-gradation image.
The principle of the error diffusion method is to display halftones of image in a pseudo manner into binary gradation depending on a number of dots per unit area.
FIG. 8 is a block diagram illustrating a circuit embodying a conventional error-diffusion-method.
In FIG. 8, multi-gradation data xe2x80x9cDxe2x80x9d of a target pixel that is to be binary coded is read out from image memory 1. The data xe2x80x9cDxe2x80x9d undergoes xcex3(gamma) correction by referring to the correction data stored inxcex3(gamma) correction ROM 2, and are corrected to multi-gradation data Dxe2x80x2 responsive to printing characteristics of output devices such as printers and the like. Adder 3 of error diffusion device 8 adds an error data xe2x80x9cExe2x80x9d of this target pixel to the corrected multi-gradation data Dxe2x80x2, then adder 3 outputs the data xe2x80x9cFxe2x80x9d of target pixel, i.e. F=Dxe2x80x2+E.
Data xe2x80x9cFxe2x80x9d including the error data of the target pixel is compared with a threshold value xe2x80x9cThxe2x80x9d at the binary coding in comparator 5. In a case of F  Th a binary signal B=xe2x80x9c1xe2x80x9d is tapped off, and in a case of F less than Th, a binary signal B=xe2x80x9c0xe2x80x9d is tapped off. Based on this output, error E produced in the binary coding process is calculated by subtracter 7 as E=Fxe2x88x92Bxe2x80x2.
When input data has 256 gradations (0-255), Bxe2x80x2=Bxc3x97255 is found. Therefore, e.g. in a case of error-weighted input multi-gradation data F=230 and threshold value Th=128, output data after binary coding is B=1, and thus the error is E=Fxe2x88x92Bxc3x97255=230xe2x88x921xc3x97255=xe2x88x9225.
This error E is weighted by weighting-error-calculator 6 according to a given error matrix Mxy, then the weighted error is stored in error memory 4 for being diffused to pixels data that are to be processed subsequently.
The weighted error data are added to the multi-gradation data of a subsequent pixel by the adder 3, whereby the error data can be diffused.
In this example, when input multi-gradation data is D=230, the output data after binary coding is xe2x80x9c1xe2x80x9d, i.e. xe2x80x9c255xe2x80x9d of the 256 gradations resulting from the comparison of the input multi-gradation data with threshold value Th=128. Thus, the error=25 is produced with regard to the input multi-gradation data D=230. As a result, the error=25 is an error of the input multi-gradation data D=230. This error is weighted by weighting-error-calculator 6 with an error matrix, then is stored in error memory 4 to be reflected to the subsequent binary coding for unprocessed pixels.
FIG. 9 shows an example of the error matrix Mxy employed in the conventional error diffusion method. In FIG. 9, a target pixel in present is marked with * symbol, and the binary coding is provided to this target pixel. The error produced in the binary coding of this target pixel is weighted by the weighting coefficients (7,1,5,3) shown in FIG. 9, then is diffused to the subsequent unprocessed pixel. The weighted error is stored in error memory 4 as an error distribution value. When the subsequent pixel is binary coded, the error distribution value stored in error memory 4 is read out, and the subsequent input value read out from the image memory 1 is corrected with this error distribution value.
As described above, according to the error diffusion method, a binary coded error, which is produced in a binary coding process provided to a pixel, is diffused (distributed) to the subsequent pixel data to be binary coded. This method tries to minimize an error between the image data after the binary coding and that before the binary coding.
This error diffusion method distributes a binary-coded-error in sequence to unprocessed pixels to be binary coded, so that the original image in multi-gradation can be displayed in binary gradation having dot-densities.
On the other hand, in the image displayed in binary gradation by the error diffusion method, the binary coding results in xe2x80x9c1xe2x80x9d or xe2x80x9c0xe2x80x9d depending on the error distribution. The result depends on a kind of probability, thus an undesirable binary-coded result can be output as follows.
1. Composite black can be happened in a low density area of an image. The composite black indicates a phenomenon where a first color, a second color and a third color, which should not have been printed simultaneously, are printed at the same dot thereby producing black color. The composite black in a low density area increases substantially the granularity of the image, whereby the image undergone the binary coding is degraded.
2. In the case where an input image includes black (K) , black (K) that should not have been printed is overlaid on the dots illuminating colors other than black such as cyan, magenta, yellow. This phenomenon invites color overlay with ease. In other words, dots which should have illuminated colors other than black are concealed by black (K), so that the colors in original image cannot be reproduced exactly. As a result, the display undergone the binary coding is degraded.
Further, since the error diffusion method involves matrix calculation for error diffusion process in each pixel and color, the calculations impose a substantial load to the error diffusion device.
The present invention addresses the problems discussed above and aims to provide a method of binary coding which can avoid overlaying colors components on a dot.
In the following description, ON or OFF of a color indicates that a binary coded output of a color is xe2x80x9cdetectivexe2x80x9d or xe2x80x9cnon-detectivexe2x80x9d in an output image. Further, colors components displaying an image are converted from red (R), green (G), and blue (B) into cyan (C), magenta (M), yellow (Y) and black (K) before undergoing the binary coding. The respective colors are represented by (R), (G), (B), (C), (M), (Y) and (K) hereinafter.
The present invention is not limited to the binary coding of (C), (M), (Y) and (K), but can be applied to the binary coding of other three primary colors.
When a multi-gradation-image is binary coded by processing halftones in a pseudo manner, the image-binary-coding-method of the present invention can avoid overlaying the respective dots of first, second and third colors on a target pixel by retaining the binary-coded-results, i.e. ON or OFF, of the first and second colors. In other words, when the binary-coded-result of the first color is ON, the result of the second color is forced to be OFF. When either one of results of first and second colors is ON, the result of third color is forced to be OFF, of whereby overlaid printing of first, second and third colors can be restrained.
If the input image includes (K), (K) firstly undergoes binary coding in the target pixel. When the result is ON, the binary-coding-results of (C), (M) and (Y) are output as OFF. In this case, the colors other than (K) in the target pixel are forcibly output as OFF, which seems to lower the reproduced image quality; however, the error diffusion method distributes errors, whereby (C), (M) and (Y) are output as ON in other pixels. As a result, the image can be correctly reproduced. When the binary coding of (K) results in OFF, other colors are binary coded in the order of higher density by caring that (C), (M) and (Y) have little chances to overlie with each other on the target pixel. Further, the characteristics of human eyes are taken into consideration, and binary coding is provided accordingly to (M), (C) and (Y) in this order, i.e. the order of higher visual sensitivity by caring that (M), (C) and (Y) have little chances to overlie with each other on the target pixel.
When a color is output as OFF, the matrix calculation for error diffusion can be omitted, thereby shortening a process time.